package com.ruoyi.project.system.uflo.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.bstek.uflo.service.HistoryService;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.system.uflo.model.dto.HistoryTaskDTO;
import com.ruoyi.project.system.uflo.model.dto.TodoTaskDTO;
import com.ruoyi.project.system.uflo.service.IUfloHistoryTaskService;
import com.ruoyi.project.system.user.domain.User;

/**
 * 流程记录
 * @author xianz
 *
 */
@Controller
@RequestMapping("/ufloHistoryTask")
public class UfloHistoryTaskController extends BaseController{


	private String prefix = "system/uflo";
	
	@Autowired
	IUfloHistoryTaskService ufloHistoryTaskService;
	
	
	/**
	 * 我的已办
	 * @return
	 */
	@GetMapping("/history")
	public String todo() {
		return prefix+"/history";
	}
	
	/**
     * 查询我的已办列表
     */
    @PostMapping("/historyList")
    @ResponseBody
    public TableDataInfo historyList(HistoryTaskDTO historyTaskDTO)
    {
        startPage();
        User user = getSysUser();
        List<HistoryTaskDTO> list = ufloHistoryTaskService.selectHistoryList(historyTaskDTO,user);
        return getDataTable(list);
    }
	
}
